realtek: pcs: rtl930x: drop unused and broken function
authorJonas Jelonek <[email protected]>
Fri, 12 Dec 2025 20:05:52 +0000 (20:05 +0000)
committerRobert Marko <[email protected]>
Tue, 16 Dec 2025 12:37:31 +0000 (13:37 +0100)
Drop the unused and broken function rtpcs_930x_sds_clock_wait from the
PCS driver. The proper working variant is already some lines above and
called rtpcs_930x_sds_wait_clock_ready.

Signed-off-by: Jonas Jelonek <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <[email protected]>
target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c

index 8368870b620b106fbb1885503770ab61a7807398..def6b445d4e449539b145b00ba3fe63e070d84d4 100644 (file)
@@ -966,26 +966,6 @@ static void rtpcs_930x_sds_tx_config(struct rtpcs_ctrl *ctrl, int sds,
        rtpcs_sds_write_bits(ctrl, sds, page, 0x18, 15, 12, impedance);
 }
 
-/* Wait for clock ready, this assumes the SerDes is in XGMII mode
- * timeout is in ms
- */
-__always_unused
-static int rtpcs_930x_sds_clock_wait(struct rtpcs_ctrl *ctrl, int timeout)
-{
-       u32 v;
-       unsigned long start = jiffies;
-       unsigned long end = start + (HZ / 1000) * timeout;
-
-       do {
-               rtpcs_sds_write_bits(ctrl, 2, 0x1f, 0x2, 15, 0, 53);
-               v = rtpcs_sds_read_bits(ctrl, 2, 0x1f, 20, 5, 4);
-               if (v == 3)
-                       return 0;
-       } while (time_before(jiffies, end));
-
-       return 1;
-}
-
 __always_unused
 static void rtpcs_930x_sds_rxcal_dcvs_manual(struct rtpcs_ctrl *ctrl, u32 sds_num,
                                             u32 dcvs_id, bool manual, u32 dvcs_list[])